package com.leadingsoft.pwxk.converter;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.leadingsoft.common.converter.AbstractConverter;
import com.leadingsoft.pwxk.dto.ProductTechDto;
import com.leadingsoft.pwxk.model.ProductTech;

/**
 * @author: lipan 2018年5月15日
 * @description: ()
 * 
 */

@Component
public class ProductTechConverter extends AbstractConverter<ProductTech, ProductTechDto> {

	@Autowired
	private ProductCapaConverter productCapaConverter;

	@Autowired
	private ProductFaciConverter productFaciConverter;

	@Autowired
	ProductDjmfdConverter productDjmfdconverter;

	@Autowired
	ProductCginfoConverter productCginfoConverter;

	@Override
	protected ProductTechDto toDtoActual(ProductTech model) {
		// TODO Auto-generated method stub

		ProductTechDto dto = new ProductTechDto();
		dto.setId(model.getId());
		dto.setDataid(model.getDataid());
		dto.setFuelname(model.getFuelname());
		dto.setTechnicscode(model.getTechnicscode());
		dto.setTechnicscontent(model.getTechnicscontent());
		dto.setTechnicsidandname(model.getTechnicsidandname());
		dto.setTechnicsname(model.getTechnicsname());
		dto.setTechnicsnumber(model.getTechnicsnumber());
		dto.setTechtypename(model.getTechtypename());
		dto.setXktechnicscodenum(model.getXktechnicscodenum());

		dto.setProductCapaList(productCapaConverter.toDto(model.getProductCapaList()));
		dto.setProductFaciList(productFaciConverter.toDto(model.getProductFaciList()));
		dto.setProducdjmfdCountList(productDjmfdconverter.toDto(model.getProducdjmfdList()));
		dto.setProducdjmfdList(productDjmfdconverter.toDto(model.getProducdjmfdList()));
		dto.setProductCginfoList(productCginfoConverter.toDto(model.getProductCginfoList()));

		return dto;
	}

	@Override
	public void copyProperties(ProductTech model, ProductTechDto dto) {

	}

}
